console.log('begin');

setTimeout(() => {
  console.log('setTimeout1')
}, 0);


  new Promise((resolve) => {
    console.log('promise2');
    resolve()
  }).then(() => {
      console.log('promise2--then1');
    }).then(() => {
      console.log('promise2--then2');
    });
console.log('end');